html,
body {
  margin: 0;
}

body {
  padding: 5rem 0 15rem 0;
}
#app {
  span.highlight_word {
    color: #000000;
    background-color: #ffff00;
    font-weight: bold;
  }

  span.highlight_word.active {
    background-color: #ff9632;
  }

  // 页面搜索
  .page_search_wrap {
    display: none;
    width: 100%;
    max-width: 50rem;
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-flow: row;
    padding: 0.8rem;
    border-radius: 0.5rem;
    z-index: 6;
    border: 1px solid var(--color9);
    align-items: center;
    user-select: none;
    background-color: var(--bg-color-o2);
    overflow: hidden;

    div {
      margin: 0 0.3rem;
    }

    .prev_btn,
    .close_btn,
    .next_btn {
      text-align: center;
      font-size: 1.6rem;
      width: 3rem;
      height: 3rem;
      line-height: 3rem;
      flex: none;
      width: 3rem;
      border-radius: 50%;

      &:hover {
        color: var(--text-hover-color);
        font-weight: bold;
      }
    }

    .res_total_num {
      line-height: 4rem;
      flex: none;
      margin: 0 1rem;
    }
    .inp_box {
      flex: auto;
      display: flex;
      align-items: center;
      border: 1px solid var(--color9);
      border-radius: 0.5rem;
      overflow: hidden;
      margin: 0;
      width: 0;
      height: 4rem;
      &.focus {
        border: 1px solid var(--text-hover-color);
      }
      input {
        flex: auto;
        width: 0;
        border: none;
        margin: 0;
        outline: none;
        background-color: transparent;
        font-size: 1.6rem;
        -webkit-appearance: none;
      }
      .clear {
        display: none;
        flex: none;
      }
    }
  }

  // 内容
  .content_wrap {
    width: 100%;
    max-width: 80rem;
    padding: 2rem;
    position: relative;
    transform: translateY(10rem);
    opacity: 0;
    z-index: 2;
    border-radius: 0.4rem;
    line-height: 1.5;
    &.big {
      max-width: var(--max-width);
    }
    &.center {
      margin: 0 auto;
    }
    &.open {
      transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
      transform: none;
      opacity: 1;
    }

    .fill_box {
      display: none;
      height: 8rem;
      width: 100%;
    }

    .author_info {
      height: 8rem;
      text-align: center;
      &.active {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 4;
        .logo {
          width: 5rem;
          height: 5rem;
        }
      }

      .logo {
        width: 8rem;
        height: 8rem;
        border-radius: 50%;
        display: inline-block;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        transition: transform 0.3s ease-in-out;
        position: relative;
        z-index: 2;

        &:hover {
          box-shadow: 0 0 0.5rem var(--color5);
          transform: rotate(360deg) scale(1.2);
        }
      }
    }

    .note_info {
      // display: none;
      margin-bottom: 4rem;

      h1 {
        padding: 1rem 0;
        margin: 0;
        border-bottom: 1px solid var(--color9);
      }

      div {
        padding: 0.5em 0;
        color: var(--color4);
        overflow: hidden;

        span {
          font-size: 0.8em;
          float: left;
        }
        .category {
          margin-right: 1rem;
          text-decoration: underline;
          &:hover {
            text-decoration: underline wavy;
            color: var(--text-hover-color);
          }
        }
      }
    }

    .note_box {
      width: 100%;
      word-break: break-all;

      img {
        display: block;
        max-height: 30rem;
        max-width: 100%;
        margin: 1rem 0;
      }
    }
  }

  // 设置按钮
  .set_btns_wrap {
    position: fixed;
    bottom: 1rem;
    right: -5rem;
    opacity: 0;
    overflow: hidden;
    z-index: 5;
    transition: right 0.6s ease-in-out, opacity 0.6s ease-in-out;

    &.open {
      right: 1rem;
      opacity: 1;
    }
    .set_bot,
    .set_top {
      div {
        width: 4rem;
        height: 4rem;
        line-height: 4rem;
        font-size: 2rem;
        text-align: center;
        margin-top: 0.6rem;
        border-radius: 0.4rem;
        color: var(--icon-color);
        font-weight: bold;
        background-color: var(--color10);
        border: 1px solid var(--color9);

        &:hover {
          background-color: var(--color9);
          color: var(--text-hover-color);
        }
      }
    }
    .set_top {
      display: none;
      .note_box_width {
        @media (max-width: 800px) {
          & {
            display: none;
          }
        }
      }
    }
    .set_bot {
      .set_btn {
        span {
          display: block;
          font-size: 2rem;
          animation: rotate360 10s infinite linear;
        }
      }
      .to_top_btn {
        display: none;
      }
    }
  }

  // 目录
  .note_dir_wrap {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: 80%;
    max-width: 40rem;
    height: 100%;
    background-color: var(--bg-color-o2);
    border-left: 1px solid var(--color9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3;
    opacity: 0;
    transition: opacity var(--speed-duration) var(--speed-timing),
      transform var(--speed-duration) var(--speed-timing);

    &.open {
      transform: translateX(0);
      opacity: 1;
    }
    .list_box {
      width: 100%;
      height: 100%;
      overflow-y: auto;
      overscroll-behavior: contain;
      -ms-scroll-chaining: contain;
      padding: 2rem 0.4rem;
      margin: 0;
      ol,
      li,
      ul {
        list-style: none;
      }
      ul {
        padding: 0;
        margin: 0;
        overflow: hidden;
        display: none;
      }

      li {
        margin-bottom: 1rem;
        overflow: hidden;
        line-height: 2rem;
        font-size: 1.6rem;
        border-left: 0.4rem solid transparent;
        display: flex;
        align-items: center;

        @media (min-width: 801px) {
          &:hover {
            color: var(--text-hover-color);
          }
        }
        .icon {
          flex: none;
          font-size: 0.5em;
          padding-right: 0.6rem;
        }
        .text {
          flex: auto;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
        }
        &[h='1'] {
          padding-left: 1em;
        }

        &[h='2'] {
          padding-left: 2em;
        }

        &[h='3'] {
          padding-left: 3em;
        }

        &[h='4'] {
          padding-left: 4em;
        }

        &[h='5'] {
          padding-left: 5em;
        }

        &[h='6'] {
          padding-left: 6em;
        }

        &.active {
          color: var(--text-hover-color);
          border-left: 0.4rem solid var(--text-hover-color);
        }
      }
    }
  }
}
